<script>
	export default {
		onLaunch: function() {
			const systemInfo = uni.getSystemInfoSync(); 
			uni.setStorageSync('bottomPadding', systemInfo.screenHeight - systemInfo.safeArea.bottom) 
			
			uni.getSystemInfo({
				success: (e) => { 
					let systemInfo = {
						statusBar:0,//状态栏高度 
						navbar:0,// 自定义标题与胶囊对齐高度 
						customBar:0
					} 
				  const custom = uni.getMenuButtonBoundingClientRect() 
				  systemInfo.statusBar = e.statusBarHeight
				  systemInfo.menuButtonLeft = custom.left
				  systemInfo.navbar = (custom.top - e.statusBarHeight) * 2 + custom.height    
				  systemInfo.customBar = custom.bottom + custom.top - e.statusBarHeight 
				  uni.setStorageSync('systemInfo',systemInfo)
			   }
			}) 
			if(uni.getStorageSync('token')){
				this.$store.dispatch('getUserInfo');
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
	@font-face {
	  font-family: 'DINPro-Medium';  /* 自定义字体名称 */
	  src: url('https://ml.bjxlu.com/DINPro-Medium.otf') format('opentype');
	}
	.clamp2{
		word-break: break-all;
		text-overflow: ellipsis;
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.clamp1{
		word-break: break-all;
		text-overflow: ellipsis;
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
	}
	.couponBox{
		display: flex;
		background: #fff;
		height: 210rpx;
		margin-bottom: 20rpx;
		.text{
			box-sizing: border-box;
			display: flex;
			flex: 1;
		}
		.right{
			margin-left: auto;
			width: 64rpx;
			height: 210rpx;
			background: rgba(4,0,0,0.06);
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			text{
				display: block;
				font-size: 24rpx;
				color: #020202;
			}
		}
		.con{
			margin-left: 23rpx;
			flex: 1;
			padding: 10rpx;
			padding-left: 0;
			.t1{
				font-size: 26rpx;
				color: #020202;
			}
			.t2{
				display: inline-block;
				padding: 0 20rpx;
				height: 40rpx;
				background: #EEEDED;
				text-align: center;
				line-height: 40rpx;
				font-size: 20rpx;
				color: #020202;
				margin-top: 12rpx;
			}
			.t3{
				font-size: 22rpx;
				color: #999999;
				margin-top: 12rpx;
			}
		}
		.left{
			width: 210rpx;
			height: 210rpx;
			background: #020202;
			border-radius: 4rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			.t1{
				font-size: 44rpx;
				color: #fff;
			}
			.t2{
				font-size: 22rpx;
				color: rgba(255,255,255,.5);
				margin-top: 10rpx;
			}
		}
	}
	.vipCodeBox{
		height: 100vh;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		.sbox{
			width: 540rpx;
			height: 540rpx;
			background: #fff;
			border-radius: 20rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			position: relative;
			.col{
				display: block;
				position: absolute;
				right: -32rpx;
				width: 64rpx;
				height: 64rpx;
				top: -32rpx;
			}
			.code{
				width: 400rpx;
				display: block;
				height: 400rpx;
			}
		}
	}
</style>
